package org.bootstrap.controller;

import cn.hutool.json.JSONObject;
import org.bootstrap.service.Impl.ConfigServiceImpl;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;

// 功能配置界面
@RestController
@CrossOrigin
@RequestMapping(value = "config", method = {
        RequestMethod.GET,
        RequestMethod.POST,
        RequestMethod.OPTIONS
})
public class ConfigController {

    @Resource
    private ConfigServiceImpl configServiceImpl;

    @GetMapping("/table")
    public JSONObject table(@RequestBody(required = false) HashMap<String, String> params) {
        return configServiceImpl.table(params);
    }

}
